import Cookies from 'js-cookie'

const tokenKey = 'cultivate_user_auth'
const nameKey = 'cultivate_user_name'

export function getToken() {
  return Cookies.get(tokenKey)
}

export function setToken(token) {
  return Cookies.set(tokenKey, token)
}

export function removeToken() {
  return Cookies.remove(tokenKey)
}

export function getUsername() {
  return Cookies.get(nameKey)
}

export function setUsername(username) {
  return Cookies.set(nameKey, username)
}

export function removeUsername() {
  return Cookies.remove(nameKey)
}
